/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mx.com.ingsw.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author kerife
 */
@Embeddable
public class HistorialPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "no_cuenta")
    private int noCuenta;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_asignatura")
    private int idAsignatura;

    public HistorialPK() {
    }

    public HistorialPK(int noCuenta, int idAsignatura) {
        this.noCuenta = noCuenta;
        this.idAsignatura = idAsignatura;
    }

    public int getNoCuenta() {
        return noCuenta;
    }

    public void setNoCuenta(int noCuenta) {
        this.noCuenta = noCuenta;
    }

    public int getIdAsignatura() {
        return idAsignatura;
    }

    public void setIdAsignatura(int idAsignatura) {
        this.idAsignatura = idAsignatura;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) noCuenta;
        hash += (int) idAsignatura;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof HistorialPK)) {
            return false;
        }
        HistorialPK other = (HistorialPK) object;
        if (this.noCuenta != other.noCuenta) {
            return false;
        }
        if (this.idAsignatura != other.idAsignatura) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mx.com.ingsw.model.HistorialPK[ noCuenta=" + noCuenta + ", idAsignatura=" + idAsignatura + " ]";
    }
    
}
